from app import db


# 创建专业方向表
class Kind(db.Model):
    id = db.Column(db.Integer,primary_key=True,autoincrement=True)
    name = db.Column(db.String(10))
    kind = db.relationship('classes',backref='kind')


# 创建班级表
class classes(db.Model):
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String(10))
    kid = db.Column(db.Integer,db.ForeignKey('kind.id'))